var addOrderIdList = [45, 22, 5]

addOrderIdList = {
    taskList: addOrderIdList
}

console.log(addOrderIdList)

$("#btn").click(function () {

    $.ajax({
        url: "http://localhost:8080/user/addOrderIdList",
        data: addOrderIdList,
        asyne: false,
        dataType: "json",
        type: "get",
        success: function (data) {
            console.log(data)
        }
    })
})